<?php

$taskId = $_GET['id'];

$dsn = "sqlsrv:Server=localhost;Database=Task";
$db = new PDO($dsn, "sa", "123456");

$sql = "update Task set TaskStatus=2 where TaskId='" . $taskId . "' ";
$result = $db->exec($sql);
if ($result) {
    echo "任务标记为进行中 成功<br />";
    echo "<a href='task_detail.php?id=".$taskId."'>返回详情页面</a>";
}